//
//  PracticeLevel3VC.m
//  LearnAnimals
//
//  Created by Admin on 1/9/13.
//  Copyright (c) 2013 THACHTUYET. All rights reserved.
//

#import "PracticeLevel3VC.h"
#import "Clock.h"

@interface PracticeLevel3VC ()

@end

@implementation PracticeLevel3VC

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    CGRect rect = CGRectMake(0, 0, 200, 200);
    Clock *clock = [[Clock alloc] initWithFrame:rect Time:20];
    [self.view addSubview:clock];
    [clock run];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


- (IBAction)goBackHome:(id)sender
{
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.8];
    [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.navigationController.view cache:NO];
    [UIView commitAnimations];
    [self.navigationController popViewControllerAnimated:NO];
    
}
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
//    [UIView beginAnimations : @"Display notif"
//                     context:nil];
//    [UIView setAnimationDuration:0.5];
//    [UIView setAnimationBeginsFromCurrentState:FALSE];
//
//    [UIView commitAnimations];
        UITouch *touch = [[event allTouches] anyObject];
    lastPoint = [touch locationInView:self.view];
}

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
    UITouch *touch = [[event allTouches] anyObject];
    CGPoint point = [touch locationInView:self.view];
    lbl.center = point;
}

@end
